<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="../../include/admincontent.jsp" %>
<div id="location">当前位置：人才简历库 > 中专校招简历库</div>
<div id="Content" class="empty">
    <!-- 条件筛选 -->
<%--    <div id="searchbox">--%>
<%--        <form id="conditionform">--%>
<%--            <table class="treeTable searchform">--%>
<%--                <thead>--%>
<%--                <tr>--%>
<%--                    <td>招聘方案:</td>--%>
<%--                    <td colspan="3">--%>
<%--                        <div><select name="pid">--%>
<%--                            <option value="">所有招聘方案</option>--%>
<%--                            ${projects}</select></div>--%>
<%--                    </td>--%>
<%--                    <td>联系电话:</td>--%>
<%--                    <td>--%>
<%--                        <div><input type="text" name="tel"/></div>--%>
<%--                    </td>--%>
<%--                    <td>性别:</td>--%>
<%--                    <td>--%>
<%--                        <div>--%>
<%--                            <select name="gender">--%>
<%--                                <option value="">不限</option>--%>
<%--                                <option value="男">男</option>--%>
<%--                                <option value="女">女</option>--%>
<%--                            </select>--%>
<%--                        </div>--%>
<%--                    </td>--%>
<%--                    <td></td>--%>
<%--                </tr>--%>
<%--                <tr>--%>
<%--                    <td>姓名:</td>--%>
<%--                    <td>--%>
<%--                        <div><input type="text" name="name"/></div>--%>
<%--                    </td>--%>
<%--                    <td>毕业院校:</td>--%>
<%--                    <td>--%>
<%--                        <div><input type="text" name="adduname"/></div>--%>
<%--                    </td>--%>
<%--                    <td>所学专业:</td>--%>
<%--                    <td>--%>
<%--                        <div><input type="text" name="major"/></div>--%>
<%--                    </td>--%>
<%--                    <td>最高学历:</td>--%>
<%--                    <td>--%>
<%--                        <div><input type="text" name="education"/></div>--%>
<%--                    </td>--%>
<%--                    <td></td>--%>
<%--                </tr>--%>
<%--                <tr>--%>
<%--                    <td colspan="8">--%>
<%--                        <button id="searchbtn" type="button" class="search"></button>--%>
<%--                    </td>--%>
<%--                    <td></td>--%>
<%--                </tr>--%>
<%--                </thead>--%>
<%--            </table>--%>
<%--        </form>--%>
<%--    </div>--%>
<%--    <table class="treeTable" id="tablelist">--%>
<%--        <thead>--%>
<%--        <tr>--%>
<%--            <td width="30">序号</td>--%>
<%--            <td width="140">姓名</td>--%>
<%--            <td width="40">性别</td>--%>
<%--            <td width="60">出生日期</td>--%>
<%--            <td width="120">身份证</td>--%>
<%--            <td width="120">毕业院校</td>--%>
<%--            <td width="100">专业</td>--%>
<%--            <td width="60">学历</td>--%>
<%--            <td width="140">电话</td>--%>
<%--            <td>招聘方案</td>--%>
<%--            <td width="80">招聘步骤</td>--%>
<%--        </tr>--%>
<%--        </thead>--%>
<%--        <tbody id="result"></tbody>--%>
<%--    </table>--%>
<%--    <div id="page"></div>--%>
</div>
<div id="sy_search" class=" f0f0f0" style="display: inline-block">
    <form id="advanceQueryParam">
        <div style="background-color: #f0f0f0">
            <div class="clearfix more_query_area label150">
                <div class="query_area_body clearfix">
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">招聘方案:</div>
                            <div class="content">
                                <div>
                                    <select name="proid">
                                        <option value="">所有招聘方案</option>
                                        ${projects}
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">联系电话:</div>
                            <div class="content">
                                <div>
                                    <input type="text" name="tel"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">性别:</div>
                            <div class="content">
                                <div>
                                    <select name="gender">
                                        <option value="">不限</option>
                                        <option value="男">男</option>
                                        <option value="女">女</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">姓名:</div>
                            <div class="content">
                                <div>
                                    <input type="text" name="name"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">毕业院校:</div>
                            <div class="content">
                                <div>
                                    <input type="text" name="adduname"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">所学专业:</div>
                            <div class="content">
                                <div>
                                    <input type="text" name="major"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">最高学历:</div>
                            <div class="content">
                                <div>
                                    <input type="text" name="education"/>
                                </div>
                            </div>
                        </div>
                    </div>
                   <%-- <div class="query_area_footer clearfix">
                        <div class="query_btns clearfix">
                            <div class="query_btn left blue" id="searchbtn">
                                <span class="label">查询</span>
                            </div>
                            <div class="query_btn left gray" id="searchreset">
                                <span class="label">重置</span>
                            </div>
                        </div>
                    </div>--%>
                    <div class="record_item">
                        <div class="toolbars">
                            <a id="searchbtn" >
                                <em class="ico16 search_16"></em>
                                <span class="menu_span" title="查询">查询</span>
                            </a>
                            <a id="searchreset">
                                <em class="ico16 refresh_16"></em>
                                <span class="menu_span" title="重置">重置</span>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
    <%--<a width="60" id="combineQuery" class="font_size12 common_button combinedQuery">查询</a>--%>
</div>
<div style="overflow:hidden;">
    <div id="div_table" style="bottom: 0px">
        <table class="layui-hide" id="table" lay-filter="zzpooltable"></table>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        layui.use('table', () => {
            let table = layui.table;
            table.render({
                id: 'table'
                , elem: '#table'
                , height: 'full'
                , url: '/pool/getzzresumesJson?' + $("#advanceQueryParam").serialize() //数据接口
                , title: '用户表'
                , page: true //开启分页
                , cols: [[ //表头
                    {type: 'checkbox', fixed: 'left', width: '5%'}
                    , {type: 'numbers', title: '序号', width: '5%', sort: true}
                    , {
                        field: 'NAME', title: '姓名', width: '9%', sort: true, templet: (d) => {
                            return "<a target='_blank' style='color: #2490f8;' href='/UserResume/ViewDResume?id="
                                + d.DRID + "'>" + d.NAME + "</a>";
                        }
                    }
                    , {field: 'GENDER', title: '性别', width: '9%', sort: true}
                    , {field: 'BIRTHDAY', title: '出生日期', width: '9%', sort: true}
                    , {type: 'CODE', title: '身份证', width: '9%', sort: true}
                    , {field: 'ADDUNAME', title: '毕业院校', width: '9%', sort: true}
                    , {field: 'MAJOR', title: '专业', width: '9%', sort: true}
                    , {field: 'EDUCATION', title: '学历', width: '9%', sort: true}
                    , {field: 'TEL', title: '电话', width: '9%', sort: true}
                    , {field: 'PNAME', title: '招聘方案', width: '9%', sort: true}
                    , {field: 'FID', title: '招聘步骤', width: '9%', sort: true}
                ]]
            });
            $("#searchbtn").on('click', () => {
                table.reload('table', {
                    url: '/pool/getzzresumesJson?' + $("#advanceQueryParam").serialize()
                    , page: {
                        curr: 1
                    }
                    , done: (res, curr, count) => {
                        tableresize(diff, false)
                    }
                })
            });
        });
        function tableresize(diff, resizeout = true) {
            let height3 = $("#div_table").height();
            let height4 = $(".layui-table-body.layui-table-main").height();
            let height5 = $(".layui-form.layui-border-box.layui-table-view").height();


            if (resizeout) {
                $("#div_table").height(height3 - diff);
            }
            $(".layui-table-body.layui-table-main").height(height4 - diff);
            $(".layui-form.layui-border-box.layui-table-view").height(height5 - diff);
        }
        let diff;
        let origin = {};
        $("#combineQuery").on('click', (e) => {
            let style = $("#advanceQueryParam")[0].style;
            if (style.display === 'block') {
                style.display = 'none';
                diff = -origin.diff;
            } else {
                style.display = 'block';
                if (!origin.diff) {
                    origin.diff = document.documentElement.scrollHeight - document.documentElement.clientHeight;
                }
                diff = origin.diff;
            }
            tableresize(diff);
        });
        $("#searchreset").on('click', (e) => {
            document.getElementById("advanceQueryParam").reset();
            $("input[name='deptcode']").val("")
        });
    });

    //简历列表信息
    function getList() {
        $("#page").myPagination({
            cssStyle: "pagination",
            ajax: {
                on: true,
                url: '/pool/getzzresumes',
                param: $("#conditionform").serialize(),
                dataType: 'html',
                callback: function (data) {
                    $("#result").html(data);
                }
            }
        });
    }
</script>
</body>
</html>